package com.nidu.demo.oauth2.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nidu.demo.oauth2.mapper.dataobject.OAuth2AccessTokenDO;
import com.nidu.demo.tenant.aop.TenantIgnore;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 职位Mapper接口
 *
 * @author auto
 */
@Mapper
public interface OAuth2AccessTokenMapper extends BaseMapper<OAuth2AccessTokenDO> {

    @TenantIgnore
    @Select("SELECT * FROM sys_oauth2_access_token WHERE access_token = #{accessToken} LIMIT 1")
    OAuth2AccessTokenDO selectByAccessToken(String accessToken);

}